<template>
  <el-tabs v-model="activeName" @tab-click="handleClick">
    <el-tab-pane :key="item.name" v-for="item in tabs" :label="item.label" :name="item.name">
      <!--  <component :is=item.content></component> -->
    </el-tab-pane>
  </el-tabs>
</template>
<script>
export default {
  data() {
    return {
      activeName: this.$route.path.split("/").pop()
    };
  },
  watch: {
    $route(to, from) {
      this.activeName = this.$route.path.split("/").pop();
    }
  },
  props: ["tabs", "handleClick"]
};
</script> 
<style>
</style>